package com.sctvcloud.beichuan.ui.activities;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;

import com.githang.statusbar.StatusBarCompat;
import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.beichuan.R;
import com.sctvcloud.beichuan.ui.fragment.EmergencyFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class EmerActivity extends FragmentActivity {
    @BindView(R.id.title_top_logo_layout)
    protected LinearLayout title_top_logo_layout;
    @BindView(R.id.title_top_title)
    protected CustomFontTextView title_top_title;
    @BindView(R.id.title_top_layout_edit)
    protected CustomFontTextView share;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_single_fragment);
        ButterKnife.bind(this);
        Bundle bundle = new Bundle();
        initViews();
        EmergencyFragment fragment = new EmergencyFragment();
        fragment.setArguments(bundle);
        getSupportFragmentManager()    //
                .beginTransaction()
                .add(R.id.fragment_container,fragment)
                .commit();

        StatusBarCompat.setStatusBarColor(this, getResources().getColor(R.color.white));

    }




    private void initViews(){

        title_top_logo_layout.setVisibility(View.GONE);
        title_top_title.setVisibility(View.VISIBLE);

        title_top_title.setText(getString(R.string.text_yingji));

        share.setVisibility(View.GONE);

    }

    @OnClick(value = {R.id.title_top_layout_back})
    public void OnClick(View view) {
        switch (view.getId()) {
            case R.id.title_top_layout_back:
                onBackPressed();
                break;
        }
    }

}
